package com.example.order.app.controller;

import com.example.order.api.client.UserClient;
import com.example.order.app.service.IOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {

    @Autowired
    private UserClient userClient;

    @Autowired
    private IOrderService orderService;

    @GetMapping("/get")
    public String getOrder() {
        return orderService.getOrder();
    }

    @GetMapping("/feign/user")
    public String getUserFeign() {
        return userClient.getUser();
    }

}
